package server.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.LastModifiedDate;
import server.model.entity.BlanceRecord;
import server.model.entity.UserBlance;
import server.model.entity.Users;

import javax.persistence.Column;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 创建人:    xvzhe
 * 创建时间:
 * 修改时间:
 * 版本:      v1.0
 */
@Data
public class BlanceRecordVo {
    private String id;

    private String userId;

    private String blanceId;

    @Column(columnDefinition = "tinyint default 1")
    private boolean status;

    @Enumerated(EnumType.STRING)
    @Column
    private BlanceRecord.Type type;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @LastModifiedDate
    @Column
    private Date modifiedTime;

    @Column
    private BigDecimal befor;

    @Column
    private BigDecimal after;

    @Column
    private String log;

    @Column
    private Users users;

    private UserBlance.Type uType;
}
